<?php
namespace app\admin\controller\v1;

use app\common\model\ProductPiece as ProductPieceModel;

use think\Controller;

class ProductPiece extends Controller
{
    public function getAll(){
        $products = ProductPieceModel::getAll();
        return successReturn($products);
    }
    public function createOne(){
        ProductPieceModel::createOne();
        return successReturn();
    }
    public function updateOne($id){
        $data = input('put.');
        ProductPieceModel::updateOne($id,$data);
        return successReturn();
    }
    public function deleteOne($id){
        ProductPieceModel::deleteOne($id);
        return successReturn();
    }
}
